//
//  NSString+CPString.m
//  News
//
//  Created by chen on 15/3/25.
//  Copyright (c) 2015年 chen. All rights reserved.
//

#import "NSString+CPString.h"

@implementation NSString (CPString)

- (CGFloat)heightWithFont:(UIFont *)font size:(CGSize)size {
    
    NSDictionary *dic = @{NSFontAttributeName:font};
    
    
   CGRect rect = [self boundingRectWithSize:size options:NSStringDrawingUsesLineFragmentOrigin attributes:dic context:nil];
    
    return rect.size.height;
}

@end
